/*
 * ioevent.h
 *
 *  Created on: 2012-3-15
 *      Author: wutao
 */

#ifndef _IOEVENT_H
#define IOEVENT_H_

#include <sys/socket.h>
#include "appsession.h"
#include "buffer.h"

extern int decodec(AppSession *session, struct buffer *buff);
extern int encodec(AppSession *session, void *msg);

extern void newconn(AppSession *session, struct sockaddr *addr);
extern void closed(AppSession *session);
extern void requested(AppSession *session, void *msg);
extern void responsed(AppSession *session, void *msg);
extern void errored(AppSession *session, void *err);





#endif /* IOEVENT_H_ */
